package net.xinqushi.io.output;

import java.io.*;
import java.util.Arrays;

public class DataOutputStreamTest {

    public static void main(String[] args) throws IOException {


        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        DataOutputStream ds = new DataOutputStream(bos);
        ds.writeBoolean(false);
        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bos.toByteArray()));
        System.out.println(dis.readBoolean());
    }
}
